<style>
.fui-page,.fui-content{background:#fff}
.col-jy-2{
    padding-right: 0;
    padding-left: 0;
}
.fui-cell-group .fui-cell .fui-input {
    background: none;
}
.fui-cell-group .fui-cell .fui-cell-label {
    width: 3rem;
	font-size: 0.75rem;
}
.btn{
   line-height:3
}
.btn.btn-banf {
    border-radius: 1.5rem;
}
input[type=checkbox], input[type=radio] {
    min-width: 0.7rem;
    min-height: 0.7rem;
    line-height: 0.7rem;
}
</style>
<div class='fui-page  fui-page-current'>
	<div class='fui-content'>
		<div style="padding:0 1rem">
		<div class="top" style="padding-top:2rem;padding-bottom:1rem">
			<div class="c">
				<img style="width:3.6rem;border-radius:0.5rem" src="{{tomedia(pagedata.account.logo) || '../core/resource/images/ng-logo.png'}}"  />
			</div>
			<div class="c gray" style="padding-top:0.2rem">{{pagedata.account.title}}</div>
		</div>
		<div class="fui-cell-group" ng-show="pagedata.item.show_type" style="margin-top:0;padding:0 0.6rem">
			<div class="fui-tab fui-tab-success">
					<a ng-class="{'active':pagedata.item.login_type!=1}" ng-click="pagedata.item.login_type=0">账号注册</a>
					<a ng-class="{'active':pagedata.item.login_type==1}" ng-click="pagedata.item.login_type=1">手机注册</a>
			</div>
		</div>
		<div class="fui-cell-group radius" ng-show="pagedata.item.login_type != 1">
			<div class="fui-cell">
				<div class="fui-cell-label" style="width:3.5rem">{{pagedata.name_title}}</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入{{pagedata.name_title}}"  ng-model="pagedata.item.username" /></div>
			</div>
			<div class="fui-cell ">
				<div class="fui-cell-label" style="width:3.5rem">密码</div>
				<div class="fui-cell-info"><input type="password" class='fui-input' placeholder="请输入密码" ng-model="pagedata.item.password" /></div>
			</div>
			<div class="fui-cell ">
				<div class="fui-cell-label" style="width:3.5rem">确认密码</div>
				<div class="fui-cell-info"><input type="password" class='fui-input' placeholder="请再次输入密码" ng-model="pagedata.item.password2" /></div>
			</div>
		</div>
		<div class="fui-cell-group radius" ng-show="pagedata.item.login_type==1">
			<div class="fui-cell">
				<div class="fui-cell-label">手机号</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入您的手机号"  ng-model="pagedata.item.mobile" /></div>
				<div class="fui-cell-remark noremark"><a class="btn btn-default btn-default-o btn-sm" ng-click="tool.mobile_code(pagedata.item.mobile,'sms_code')" id="sms_code">获取验证码</a></div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label">验证码</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入验证码" ng-model="pagedata.item.smscode" /></div>
			</div>
		</div>
		<div class="fui-cell-group radius">
				<div ng-if="pagedata.setting.show_code==1" class="fui-cell">
					<div class="fui-cell-label" style="width:3.5rem">邀请码</div>
					<div class="fui-cell-text">
					<input type="text" class='fui-input' placeholder="请输入推荐人邀请码"  ng-model="pagedata.item.fromcode" ng-blur="pagedata.showmember()"/>
					<div ng-if="pagedata.tomember.id" class='fui-cellone radius' style="margin-left:0.3rem;margin-right:0.5rem;padding:0.2rem;background-color:rgba(0,0,0,0.3)">
						<div class='fui-cell-label' style='width:auto;color:#fff'><img ng-src="{{tomedia(pagedata.tomember.avatar) ||'../core/resource/images/nopic.jpg'}}" class="round" style="width:1.2rem;height:1.2rem;border-radius:100%"></div>
						<div class='fui-cell-text' style="font-size:0.45rem">
							<div class="text">{{pagedata.tomember.nickname||pagedata.tomember.username}}</div>
							<div class="text">MID:{{pagedata.tomember.id}}</div>
						</div>
					</div>
					</div>
				</div>
				<div class="fui-cell small " style="padding-bottom:0">
					<div class="fui-cell-info">
						<label class="checkbox-inline">
							<input type="checkbox" value="1" ng-model="pagedata.item.check" class="fui-checkbox-primary" id="agree" ng-checked="pagedata.item.check==1"/> 我已经阅读并了解了<a id="btn-apply" ng-click="pagedata.show_xieyi=true;" style="color:#337ab7;">【{{pagedata.setmobile.xieyi_title || '客户注册协议'}}】</a>。
						</label>
					</div>
				</div>
		</div>
		<a href='javascript:;' ng-click="post(pagedata.item,'register')" class='btn btn-banf btn-success block'>注册</a>
		<div class="form-group other-login-line">
				<div class="login-footer">已经有了{{pagedata.name}}账号？<a class="action" href="javascript:;" ng-click="access_json(links('/member.login/'))">去登录</a></div>
		</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('common/_footer')"></div>
<div ng-include="sys_html('common/_xieyi',true)"></div>
<script>
if(scope.pagedata.item){
	scope.pagedata.item.needcheck=1;
}
scope.pagedata.showmember=function(){
	if(!scope.pagedata.item.fromcode){
		return '';
	}
	scope.get('core/member.register/getmember/fromcode='+scope.pagedata.item.fromcode,function(res){
		if(res.tomember && res.tomember.id){
			scope.pagedata.tomember=res.tomember;
		}else{
			scope.message(res,'error');
		}
	});
}
</script>